package com.faithbj.device.model.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

/**
 * 出入库单的详细表
 *
 */
@Entity
public class StockItem extends BaseEntity{

	/**
	 * 
	 */
	private static final long serialVersionUID = 4622781852066350896L;

	//出入库编号
	private Stock stock;
	
	//出入库总额
	private BigDecimal price;
	
	//出入库数量
	private Integer count;
	
	
	//部门名称
	private String deployment;
	
    //实验室名称
	private String labname;
	
	//物品编号
	private Consumable consumable;
	
	public StockItem() {
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(nullable = false)
	public Stock getStock() {
		return stock;
	}
	
	public BigDecimal getPrice() {
		return price;
	}

	

	public void setStock(Stock stock) {
		this.stock = stock;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	public String getDeployment() {
		return deployment;
	}

	public void setDeployment(String deployment) {
		this.deployment = deployment;
	}

	public String getLabname() {
		return labname;
	}

	public void setLabname(String labname) {
		this.labname = labname;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	public Consumable getConsumable() {
		return consumable;
	}

	public void setConsumable(Consumable consumable) {
		this.consumable = consumable;
	}
	
}
